/*
 * @(#)InterLevelConsistencyChecker.java   10/01/11
 * 
 * Copyright (C) 2009 Ecole des Mines d'Ales
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Contact: yulinz88@gmail.com
 */



/**
 *
 */
package fr.ema.arch3d.analyser.consistencyChecker.consistencyCheckerItf;

import fr.ema.arch3d.jmodel.assembly.Assembly;
import fr.ema.arch3d.jmodel.configuration.Configuration;
import fr.ema.arch3d.jmodel.specification.Specification;
import fr.ema.arch3d.xoadl.configuration.ComponentClassADL;
import fr.ema.arch3d.xoadl.configuration.ConnectorClassADL;
import fr.ema.arch3d.xoadl.specification.ComponentRoleADL;
import fr.ema.arch3d.xoadl.specification.ConnectionADL;

//~--- interfaces -------------------------------------------------------------

/**
 * class description
 *
 * @version    version 11 janv. 2010
 * @author     Huaxi (Yulin) ZHANG
 */
public interface InterLevelConsistencyChecker {

    /**
     * Check whethe the configuration conforms with its implememting specification
     *
     * @param spec  the specification should be checked
     * @param config  he configruation should be checked
     */
    void scConsistencyCheck(Specification spec, Configuration config);

    /**
     * Check the component class whether conforms with its implementing component role
     *
     * @param cmpRole  the component role should be checked
     * @param cmpClass  the component class should be checked
     */
    void cmpRoleClassCheck(ComponentRoleADL cmpRole, ComponentClassADL cmpClass);

    /**
     * Check whether the connector class correctly conform with its implementing connection
     *
     * @param connection  the connection should be checked
     * @param ctrClass  the connector class should be checked
     */
    void connectionConnectorCheck(ConnectionADL connection, ConnectorClassADL ctrClass);

    /**
     * Check whether the assembly is conform with its implementing configruation
     *
     * @param config  the configuration should be checked
     * @param ass  the assembly should be checked
     */
    void caConsistencyCheck(Configuration config, Assembly ass);

//  void cmpClassInsCheck(ComponentClassADL cmpClass, ComponentInstanceADL cmpIns);

    /**
     * Check whether the assembly obeys the instantation rule of component role, precisely check the maxi number and min number of the instatiation
     *
     * @param ass  the assembly should be checked
     * @param cmpRole  the component role should be checked
     */
    void componentInstantiationCheck(Assembly ass, ComponentRoleADL cmpRole);
}
